/* reset */
button,
fieldset,
input {
  all: unset;
}

.modal-overlay {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(1px);
  position: fixed;
  inset: 0;
  animation: overlayShow 175ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content {
  border: var(--swm-dropdown-border);
  box-shadow: var(--swm-dropdown-shadow);
  background-color: var(--swm-popover-background);
  border-radius: 6px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 75%;
  max-width: 450px;
  max-height: 85%;
  padding: 25px;
  animation: contentShow 175ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--swm-backdrop-shadow);
}
.modal-content:focus {
  outline: none;
}

.modal-content-fullscreen {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  transform: none;
  top: 0;
  left: 0;
  animation: fullScreenContentShow 200ms ease-out;
}

.modal-title {
  margin: 0 0 10px 0;
  font-weight: 500;
  color: var(--swm-default-text);
  font-size: 18px;
}

.modal-content-container {
  max-height: 80vh;
  overflow-y: auto;
  transition: height 0.3s ease-out;
}

.modal-content-container-fullscreen {
  max-height: none;
}

.modal-close-button {
  position: absolute;
  top: 10px;
  right: 10px;
}

@keyframes overlayShow {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(1px);
  }
}

@keyframes contentShow {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes fullScreenContentShow {
  0% {
    transform: translateY(25%);
    opacity: 0.8;
  }
  100% {
    transform: translateY(0%);
    opacity: 1;
  }
}
